#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include "dataserializer.h"

DataSerializer::DataSerializer()
{
}

void DataSerializer::serialize(const wxString & file, vector<Object> objects)
{
	const char * path = file.ToAscii().release();
	FILE * f = fopen(path, "w");
	srand(time(0));
	double number = 0;
	int mult = 0;
	for (int j = 0; j < 10000000; ++j) {
		for (int i = 0; i < 40; ++i) {
			number = rand() / 100.0;
			mult = rand() / 2 == 0 ? 1 : -1;
			fprintf(f, "%lg ", number * mult);
		}
		fprintf(f, "\n");
	}
	fclose(f);
}